//
//  GegisterViewController.m
//  UI0511HomeworkTwo
//
//  Created by dllo on 16/5/11.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "GegisterViewController.h"
#import "LoginViewController.h"
@interface GegisterViewController ()

@end

@implementation GegisterViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self creatLogin];
    
    
}


- (void)creatLogin{
    
    self.navigationItem.title = @"注册";
    self.navigationItem.leftBarButtonItem= [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(handleGegis)];
    
    UITextField *field1 = [[UITextField alloc] initWithFrame:CGRectMake(50, 80, 300, 40)];
    field1.text = @"请输入用户名";
    [self.view addSubview:field1];
    [field1 release];
    field1.alpha = 0.2;
    field1.borderStyle = 1;
    
    UITextField *field2 = [[UITextField alloc] initWithFrame:CGRectMake(50, 180, 300, 40)];
    field2.text = @"请输入密码";
    [self.view addSubview:field2];
    [field2 release];
    field2.alpha = 0.2;
    field2.borderStyle = 1;
    
    UITextField *field3 = [[UITextField alloc] initWithFrame:CGRectMake(50, 280, 300, 40)];
    field3.text = @"请确认密码";
    [self.view addSubview:field3];
    [field3 release];
    field3.alpha = 0.2;
    field3.borderStyle = 1;
    
    UIButton *button1 = [[UIButton alloc] initWithFrame:CGRectMake(100, 380, 100, 100)];
    
    [self.view addSubview:button1];
    
    button1.backgroundColor = [UIColor cyanColor];
    
    [button1 setTitle:@"返回" forState:UIControlStateNormal];
    
    [button1 addTarget:self action:@selector(handleChange) forControlEvents:UIControlEventTouchUpInside];
    
    
    
}

- (void)handleGegis{
    
    [self.navigationController popToViewController:self.navigationController.viewControllers[0] animated:YES];


}

- (void)handleChange{
    
    [self.navigationController popToViewController:self.navigationController.viewControllers[0] animated:YES];




}






@end
